package work2;

import Uti.ScannerUti;

public class Mobile {
    String Brand;
    String mSystem;
    int cpuNum;
    double price;


    public Mobile() {
        /*": " + Brand + "\n: " + mSystem + "\n：" + cpuNum + "\n" + price + "\n"*/
        System.out.println("手机品牌:");
        this.Brand = ScannerUti.getSting();
        System.out.println("操作系统:");
        this.mSystem = ScannerUti.getSting();
        System.out.println("cpu数:");
        this.cpuNum = ScannerUti.getInt();
        System.out.println("价格:");
        this.price = ScannerUti.getDouble();
    }

    public Mobile(String Brand, String mSystem, int cpuNum, double price) {
        this.Brand = Brand;
        this.mSystem = mSystem;
        this.cpuNum = cpuNum;
        this.price = price;
    }

    /**
     * 获取
     * @return Brand
     */
    public String getBrand() {
        return Brand;
    }

    /**
     * 设置
     * @param Brand
     */
    public void setBrand(String Brand) {
        this.Brand = Brand;
    }

    /**
     * 获取
     * @return mSystem
     */
    public String getMSystem() {
        return mSystem;
    }

    /**
     * 设置
     * @param mSystem
     */
    public void setMSystem(String mSystem) {
        this.mSystem = mSystem;
    }

    /**
     * 获取
     * @return cpuNum
     */
    public int getCpuNum() {
        return cpuNum;
    }

    /**
     * 设置
     * @param cpuNum
     */
    public void setCpuNum(int cpuNum) {
        this.cpuNum = cpuNum;
    }

    /**
     * 获取
     * @return price
     */
    public double getPrice() {
        return price;
    }

    /**
     * 设置
     * @param price
     */
    public void setPrice(double price) {
        this.price = price;
    }

    public String toString() {
        return "手机品牌: " + Brand + "\n操作系统: " + mSystem + "\ncpu数：" + cpuNum + "\n价格：" + price + "元\n";
    }
}
